Infopunk = class('Infopunk'):include(Stateful)

function Infopunk:initialize()
	self.Server_Thread = love.thread.newThread('main_thread.lua')
	self.Server_Thread:start()
	self.World = Map:new()


	
	self.controls = {}
	self.controls.camera_up = {"up", "w"}
	self.controls.camera_down = {"down", "s"}
	self.controls.camera_right = {"right", "d"}
	self.controls.camera_left = {"left", "a"}

end

function Infopunk:update(dt)

	self.World:update(dt, self.controls)
	
end

function Infopunk:draw()
	self.World:draw()
	love.graphics.print(self.World.scale, self.World.view_width - 40, self.World.view_height - 40)	
end

function Infopunk:keypressed(key, isRepeat)
	if key == "b" then
		debug.debug()
	end
	self.World:controls(key, isRepeat)
end